<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <title>查询所有</title>
</head>
<body>
<div class="container" style="text-align: center">
    <h2>顺风搬家预约登记系统</h2>
       <caption align="right">顺风搬家，一路顺风</caption>
           <table class="table table-dark table-hover">
               <thead>
               <tr>
                   <th>起始地区</th>
                   <th>所用车型</th>
                   <th>搬家日期</th>
                   <th>联系人</th>
                   <th>联系电话</th>
                   <th>状态</th>
                   <th>操作</th>
               </tr>
               <thead>
               <tbody>
           <tr th:each="MoveBooking,AllList : ${list}">
               <td th:text="${MoveBooking.id}" style="display: none"></td>
               <td th:text="${MoveBooking.area}"></td>
               <td th:text="${MoveBooking.carType}"></td>
               <td th:text="${MoveBooking.moveDate}"></td>
               <td th:text="${MoveBooking.contact}"></td>
               <td th:text="${MoveBooking.phone}"></td>
               <td th:text="${MoveBooking.status == 0 ? '未处理' : (MoveBooking.status ==1 ?  '已派车' :(MoveBooking.status ==2 ?  '已结束' :'未知'))}"></td>
               <td>
                   <a th:href="@{/HandleUpdate(id=${MoveBooking.getId()})}" style="color: white"><button type="button" class="btn btn-danger">处理</button></a>
                   <a th:href="@{/details(id=${MoveBooking.getId()})}" style="color: white"><button type="button" class="btn btn-info">详情</button></a>
                   <a th:href="@{/order}" style="color: white"><button type="button" class="btn btn-success">预约</button></a>
               </td>
           </tr>
           </tbody>
           </table>

   </div>
   </div>
</body>
</html>